Skip to content

Add SBOM quality gate with PR reporting and regression detection#4

Merged
mrdavidlaing merged 2 commits intomainfrom
quality-gate-workflow-and-scripts
Mar 17, 2026
Merged

Add SBOM quality gate with PR reporting and regression detection#4
mrdavidlaing merged 2 commits intomainfrom
quality-gate-workflow-and-scripts

Conversation

@mrdavidlaing
Copy link
Contributor

Summary

  • Split sbom-generate-upload.yml into three focused workflows: generate, quality gate, and upload
  • Quality gate scores PRs with sbomqs, diffs with sbomlyze, posts a markdown PR comment, and blocks merge on quality regression
  • Uses Nix-packaged sbomqs/sbomlyze (from sibling nix package sbomqs and sbomlyze yak) instead of curl installs
  • Quality gate runs on cheaper blacksmith-2vcpu runners; generate/upload stay on blacksmith-4vcpu
  • Four new TDD scripts with 45 shellspec examples, all passing

Test plan

  • Verify shellspec passes (45 examples, 0 failures)
  • Confirm sbom-generate.yml triggers on PR and push to main
  • Confirm quality gate skips gracefully on direct push to main (no PR to comment on)
  • Confirm upload workflow only fires on main after successful generate
  • Verify Nix packages .#sbomqs and .#sbomlyze build (depends on sibling yak)

🤖 Generated with Claude Code

Yakira and others added 2 commits March 17, 2026 10:50
…tection

Split sbom-generate-upload.yml into three workflows:
- sbom-generate.yml: generate, patch, and enrich SBOMs (PR + main)
- sbom-quality-gate.yml: score with sbomqs, diff with sbomlyze,
  post PR comment, block merge on quality regression
- sbom-upload.yml: upload enriched SBOMs to sbomify (main only)

Quality gate uses Nix-packaged sbomqs/sbomlyze instead of curl installs,
and runs on cheaper blacksmith-2vcpu runners. Scripts use awk instead of
bc for portability.

New TDD scripts (45 shellspec examples, all passing):
- bin/patch-sbom-root: rewrite bombon root component metadata
- bin/sbom-score: wraps sbomqs, outputs structured JSON
- bin/sbom-compare: wraps sbomlyze diff with policy checking
- bin/sbom-report: aggregates results into markdown, exits non-zero
  on quality regression

Co-Authored-By: Yakoff (Claude) <noreply@anthropic.com>
- Extract Nix install + cache into shared .github/actions/setup-nix composite action
- Use YAML anchors to share trigger paths between pull_request and push
- Downgrade generate/upload runners to blacksmith-2vcpu-ubuntu-2404
- Put sbomqs/sbomlyze on PATH via GITHUB_PATH instead of --cmd flags
- Rename artifact prefix from sbom-qg- to sbom-quality-gate-
- Add comment explaining when score job is skipped (direct push to main)
- Upgrade sticky-pull-request-comment v2 -> v3
- Rename sbom-upload.yml to sbom-upload-sbomify-com.yml
- Remove PLACEHOLDER items from upload matrix (only list real component IDs)

Co-Authored-By: Yakoff (Claude) <noreply@anthropic.com>
@mrdavidlaing mrdavidlaing force-pushed the quality-gate-workflow-and-scripts branch from 0c19650 to 37486b7 Compare March 17, 2026 10:51
@mrdavidlaing mrdavidlaing merged commit fb916ea into main Mar 17, 2026
8 checks passed
@mrdavidlaing mrdavidlaing deleted the quality-gate-workflow-and-scripts branch March 17, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant